process.cwd();


console.log = function(d) {
  process.stdout.write(d + '\n')
}

console.log('hello world');

process.stderr.write('err msg!');

process.stdin.on('readable', function() {
  var chunk = process.stdin.read();
  if (chunk !== null) {
    process.stdout.write('data: ' + chunk);
  }
});

//参数err表示发生的异常
process.on("uncaughtException",function(err){
  console.log(err);
});
//故意抛出一个异常
throw new Error("我故意的...");